package com.home.auto_navigation.common;

import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.safari.SafariDriver;

public enum Browser {
    
    FIREFOX{

	@Override
	public RemoteWebDriver openBrowser(RemoteWebDriver driver) {
	    return driver= new FirefoxDriver();
	}
	 
    },
    CHROME{

	@Override
	public RemoteWebDriver openBrowser(RemoteWebDriver driver) {
	    System.setProperty("webdriver.chrome.driver", "D:\\programs\\chromedriver_win_22_0_1203_0b\\chromedriver.exe");
	    return driver = new ChromeDriver();
	}
	
    },
    IE{

	@Override
	public RemoteWebDriver openBrowser(RemoteWebDriver driver) {
	    System.setProperty("webdriver.ie.driver", "D:\\programs\\IEDriverServer_x64_2.25.2\\IEDriverServer.exe");
	    return driver = new InternetExplorerDriver();
	}
	
    },
    SAFARI{

	@Override
	public RemoteWebDriver openBrowser(RemoteWebDriver driver) {
	    return driver = new SafariDriver();
	}
	
    };
    public abstract RemoteWebDriver openBrowser(RemoteWebDriver driver);
    
}
